package com.kaifamiao.date1112;

import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;

public class ModifierTest {

	public static void main(String[] args) throws Exception {
		
		Class<?> c = USB.class;
		
		int mods = c.getModifiers();
		
		System.out.println( mods );
		
		String modifiers = Modifier.toString( mods );
		
		System.out.println( modifiers );
		
		Field f = c.getDeclaredField( "UNIT" );
		System.out.println( Modifier.toString( f.getModifiers() ) );
		
		Method m = c.getDeclaredMethod( "charge" );
		System.out.println( Modifier.toString( m.getModifiers() ) );
	}

}
